import request from '@/utils/request';
import { adminUrl } from "@/utils/baseUrl.js";

// 创建评分配置
export function createEvaluationScoreItem(data) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/create',
    method: 'post',
    data: data
  })
}

// 更新评分配置
export function updateEvaluationScoreItem(data) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/update',
    method: 'put',
    data: data
  })
}


// 更新评分配置(增删改)
export function editEvaluationScoreItem(data) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/edit',
    method: 'put',
    data: data
  })
}

// 删除评分配置
export function deleteEvaluationScoreItem(id) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/delete?id=' + id,
    method: 'delete'
  })
}

// 获得评分配置
export function getEvaluationScoreItem(id) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/get?id=' + id,
    method: 'get'
  })
}

// 获得评分配置分页
export function getEvaluationScoreItemPage(query) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/page',
    method: 'get',
    params: query
  })
}

// 获得评分配置列表
export function searchEvaluationScoreItemList(query) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/list',
    method: 'get',
    params: query
  })
}

// 导出评分配置 Excel
export function exportEvaluationScoreItemExcel(query) {
  return request({
    url: adminUrl + '/study/evaluation-score-item/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
